<%@ page import = "java.util.ArrayList" import = "br.com.unieuro.dominio.Usuario" %>
<html>

<%
ArrayList<Usuario> lista = (ArrayList<Usuario>)request.getSession().getAttribute("listaUsuarios");
if(lista == null)
	lista = new ArrayList<Usuario>();
%>
<body>
<center>
<body background="/trabalho/jsp/fundo4.jpg" bgcolor="#00008B">
<span style="font-family: 'Arial Black'; font-size: xx-large; font-weight: normal; font-style: normal; font-variant: small-caps; color: #CAE1FF;">
     <span style="font-size: xx-large; font-style: normal; font-weight: bold; text-transform: capitalize; color: #CAE1FF">Usuarios Cadastrados</span>
    <br />
	<table border="1" title="Lista de Usuarios">
			<tr>
				<td align=center>
					<span style="font-size: large; font-weight: bold; color: #CAE1FF">ID</span>
				</td>
				<td align=center>
					<span style="font-size: large; font-weight: bold; color:#CAE1FF">USUARIO</span>
				</td>
                <td align=center>
					<span style="font-size: large; font-weight: bold; color: #CAE1FF">CPF</span>
				</td>
				<td align=center>
					<span style="font-size: large; font-weight: bold; color: #CAE1FF">PERFIL</span>
				</td>
			</tr>
			<% for(Usuario u : lista){ %>
			<tr>
				<td align=center>
					<span style="font-size: large; font-weight: bold; color: #CAE1FF"><%= u.getId()%></span>
				</td>
				<td align=center>
					<span style="font-size: large; font-weight: bold; color: #CAE1FF"><%= u.getNome()%></span>
				</td>
                <td align=center>
					<span style="font-size: large; font-weight: bold; color: #CAE1FF"><%= u.getCpf() %></span>
				</td>
				<td align=center>
					<span style="font-size: large; font-weight: bold; color: #CAE1FF"><%= u.getPerfil() %></span>
				</td>
			</tr>
			<%} %>
		</table>
		 <span style="font-size: xx-large; font-style: normal; font-weight: bold; text-transform: capitalize; color: #CAE1FF">Gerenciar Cadastro de Usuarios</span>
    <br />
	<form action="/trabalho/editarExcluirPessoa" method="get">
		<table border="0">
			<tr>
				<td>
					<span style="font-size: large; font-weight: bold; color: #CAE1FF">ID:</span>
				</td>
				<td>
					<input type="text" name="id" size= "2" style="width: 38px" />
				</td>
				<td>
					<span style="font-size: large; font-weight: bold; color: #CAE1FF">NOME:</span>
				</td>
				<td>
					<input type="text" name="login" />
				</td>
			</tr>
            <tr>
				<td>
					<span style="font-size: large; font-weight: bold; color: #CAE1FF">CPF:</span>
				</td>
				<td>
					<input type="text" name="cpf" />
				</td>
			</tr>
			<tr>
				<td>
					<span style="font-size: large; font-weight: bold; color: #CAE1FF">SENHA:</span>
				</td>
				<td>
					<input type="password" name="passwd" style="width: 79px"/>
				</td>
			</tr>
			<tr>
				<td>
					<span style="font-size: large; font-weight: bold; color: #CAE1FF">PERFIL:</span>
				</td>
				<td>
					<select NAME="perfil">
					    <option>     </option>
						<option>COMUM</option>
						<option>ADMIN</option>
					</select>
				</td>
			</tr>
			<tr>
				<td class="style1">
					<input type = "hidden" value="editarExcluirPessoa" name="pagina"/>
				</td>
				<td class="style1">
					<input type="submit" name= "gerenciar" value="Alterar" style="background-color: #43CD80"/>&nbsp;&nbsp;&nbsp;&nbsp;
					<input type="submit" name= "gerenciar" value="Excluir" style="background-color: #FF3030"/>&nbsp;&nbsp;&nbsp;&nbsp;
				</td>
				<td class="style1">
					<input type="reset" value="Limpar"style="background-color: #CAE1FF"/>&nbsp;&nbsp;&nbsp;&nbsp;
				</td>
			</tr>
		</table>
	</form>
</center>
</body>
<center>
    <a href="/trabalho/jsp/cadastroUsuario.jsp"style="color:#CAE1FF">Cadastrar Usuario</a>
    <a href="/trabalho/jsp/loginok.jsp" style="color:#CAE1FF">Principal</a>
</center>
</html>
